from pms.common.views import PostFormula
from user.models import Permission


class API(PostFormula):
    def handle(self, req):
        permissions = Permission.objects.all().values('id', 'name', 'detail')
        return self.success_respond({
            'list': list(permissions)
        })
